package com.electromagnetic.industry.software.manage.pojo.models;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.electromagnetic.industry.software.common.util.EleIdCreator;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("ed_role_permission")
public class RolePermission extends BaseModel {

    /**
     * 主键id
     */
    private String id;

    /**
     * 角色编码
     */
    @TableField(value = "role_id")
    private String roleId;

    /**
     * 文件编码
     */
    @TableField(value = "file_id")
    private String fileId;

    /**
     * 权限标识
     */
    @TableField(value = "permission_code")
    private String permissionCode;

    public void newInit() {
        this.setId(EleIdCreator.createSnowflakeId());
    }
}
